#pragma once

#include "map.h"
#include "datatypedefine.h"
#include "transformableactor.h"

namespace VrDataCore
{
	class TriggerBase;
	class VRDATACORE_EXPORT DrawableActor:public TransformableActor
	{
	public:
		DrawableActor();
	public:
		virtual void buildPropertyMap();
		virtual void onMapLoadBegin(CoreBase::Map*){}
		virtual void onMapLoadEnd(CoreBase::Map*);
		virtual void setActive(QString active);
		virtual QString getActive();
		//virtual void updataAllLinkLine();
		virtual bool inScene();
		QString getParentID();
		void setParentID(QString strParentID);
		void relinkParent(CoreBase::Map* map);
		void registerEvent(TriggerBase* opr);
		void unRegisterEvent(TriggerBase* opr);
		void acceptTrigger(osg::ref_ptr<CoreBase::ActorBase> trigger);
	protected:
		virtual void createDrawable() = 0;
		virtual ~DrawableActor(void);
		QString _parentID;
		QVector<TriggerBase*> _eventVec;
	};
}